
#Texdi

##Introducción
This documentation describes how to use and detail advantages and disadvantages of Texdi.
It is recommended to read Tedi reference before this document.

##Languages supported
Texdi name is from a portmanteau between text and tedi. Texdi goal is supporting all markup languages possibles. Supported languages were chosen by popularity and uses.
Every converter are isolated libraries. Their names come from tedi2LANG where LANG is the language to be converted with.
__
-- HTML: tedi2html
-- Latex: tedi2tex
-- Asciidoc: tedi2ad
-- Markdown: tedi2md
,,

##Terminal parameters

Allow different workflows for different uses. 

<--latex
Convert to latex without author. 
<--html
Convert to HTML with stylesheet by default. 
<--asciidoc
Convert file to AsciiDoc. 
<--markdown
Convert file to Markdown. 
<--output ARCHIVO
<-o ARCHIVO
Allow user choose output filename. 
<--own-styles
Link styles.css to document when converting to HTML. 
<--help
Print this list with the same options. 

##Reference version

The first implementation was Matedi. This implementation started as a function used when loading page. At first it was easy to do but when Tedi got better code (compilers and interpreters are difficult) it got development a bit slow. This implementation converted to HTML only and made the way to the first library called tedi2html. 
The first library led the way to create Texdi. First public version came with HTML, Latex and TXT conversion. TXT conversion later subdivided into Markdown and Asciidoc. Because similarities with definitios and development, tedi2html is the reference library of Tedi.

tedi2html follows a sequential order that generates a hierarchy. Before every conversion, the whole file is preprocessed and all inserted documents are add to a single temporal file.

##Control tags
Only comments, metatags and embed tags are included in this category.
Because this tags must be in first tag of line it's easier.

###Comments

This tags avoids saving anything to the converted file. It allows describe parts of the document.

###Embed

Library detects this tag, delete it and keep the line untouched. This tag allows interpreter or compiler of the converted language read that tag easily and without fails.

###Metatag

This tags keeps its capabilities from reference and it's suppose to work as intended. 

##Quotes

Avoid conversion of links, images and containers. Starting quotation mark must be on first character of the line and closing quotation mark must be in last character. 
User can add line break in quoted lines with a white space before the closing quotation mark.

##Containers, images and links

A container is a piece of text (that can have more tags inside) that is isolated from the rest between brackets.
Containers work like HTML div. Its conversion is like itself but with HTML syntax.
Images and links work same but for img tags and a tags.

##Tables

Last conversion done by code is converting Tedi tables to HTML/Latex/Markdown/Asciidoc tables.
Unique part of code that needs to know previous lines and next line of file.

##Last notes

Styles recomendation are highly recommended for Tedi files also for titles.


